package com.cts.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.cts.entity.Blog;
import com.cts.model.vo.BlogInfoVO;
import com.cts.model.vo.RandomBlogVO;
import com.cts.model.vo.TimeLineVO;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;


/**
* @author tongshengchen
* @description 针对表【blog】的数据库操作Mapper
* @createDate 2023-02-06 18:30:39
* @Entity com.cts.entity.BlogListDTO
*/
@Mapper
@Repository
public interface BlogMapper  extends BaseMapper<Blog> {


    Boolean publishBlog(Integer id, Boolean isPublished);

    Boolean topBlog(Integer id, Boolean isTop);

    void privateVisible(Long id);

    void updateVisible(Blog blog);

    List<RandomBlogVO> getRandomBlogs();

    IPage<BlogInfoVO> getBlogs(Page<BlogInfoVO> blogInfoVOPage, String type, String value);

    List<TimeLineVO> getBlogTimeLine();
}




